package com.ygl.strategy.opentracing.configuration;

import com.ygl.strategy.constant.StrategyConstant;
import com.ygl.strategy.opentracing.operation.StrategyOpentracingOperation;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author yanggld
 * @Date 2019/12/19-16:49
 * @Description
 */
@Configuration
public class StrategyOpentracingAutoConfiguration {

    @Bean
    @ConditionalOnProperty(value = StrategyConstant.SPRING_APPLICATION_STRATEGY_TRACE_ENABLED, matchIfMissing = false)
    public StrategyOpentracingOperation strategyOpentracingOperation() {
        return new StrategyOpentracingOperation();
    }

}
